angularJs学习5: 操作html的Dom 发表于 2016-03-02 | 分类于 angulasJs | 实例一123456789101112131415161718192021<html><head><meta charset="utf-8"><script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script></head><body><div ng-app="" ng-init="mySwitch=true"><p><button ng-disabled="mySwitch">点我!</button></p><p><input type="checkbox" ng-model="mySwitch"/>按钮</p><p>{{ mySwitch }}</p></div> </body></html> 示例2 show指令 hide指令1234567<p ng-show="true">我是可见的。</p><p ng-show="false">我是不可见的。</p><div ng-app="" ng-init="hour=11"><p ng-show="hour > 12">我是可见的。</p>